import os
from flask import Flask
from application.extentions import init_plug
from application.views import init_bg
import application.config as config


def create_app():
    app = Flask((os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))))
    app.config.from_object(config)
    init_bg(app)
    init_plug(app)
    return app
